package edu.sctu.zcy.month201505.day20150504.polymorphic;

/**
 * Created by user24 on 2015/5/4.
 */
public class UpDemo {

    public static void main(String[] args) {
        Employee[] arr = new Employee[2];
        arr[0] = new Employee("张三", "男");

        Manager m = new Manager("李四", "女");
        arr[1] = m;
        m.setDividend(39990);

        for (Employee e : arr) {
            e.setWage(4000);
            e.setBonus(2000);
            e.setAge(25);
            System.out.println("姓名：" + e.getName());
            System.out.println("性别：" + e.getSex());
            System.out.println("年龄：" + e.getAge());
            System.out.println("工资：" + e.getWage());
            System.out.println("奖金：" + e.getBonus());
            System.out.println("收入：" + e.getInCome());
        }
    }
}